$OpenBSD: patch-Makefile_in,v 1.4 2014/11/10 17:39:00 sebastia Exp $

Do not use the two-stages install here, just patch the first step (collate)
and make use of the INSTALL_TARGET in the ports Makefile

--- Makefile.in.orig	Thu Nov 21 23:03:12 2013
+++ Makefile.in	Tue Nov  4 10:41:35 2014
@@ -129,22 +129,15 @@ collate: all
 		here=`pwd` && \
 		cd $$sub && \
 		$(MAKE) install \
-			exec_prefix=$$here/Img/exec_prefix		\
-			prefix=$$here/Img/prefix			\
-			pkglibdir=$$here/Img/exec_prefix/lib/Img	\
-			libdir=$$here/Img/exec_prefix/lib		\
-			includedir=$$here/Img/prefix/include		\
-			DESTDIR=					\
+			exec_prefix=$(prefix)/				\
+			prefix=$(prefix)/				\
+			pkglibdir=$(LIB_RUNTIME_DIR)/$${sub}		\
+			libdir=$(prefix)/lib/				\
+			includedir=$(prefix)/include/			\
 			|| exit $$? &&					\
-		cd $$here && \
-		if test "x$(SHARED_BUILD)" = "x1"; then \
-		cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
-		fi ; \
+		cd $$here ; \
 	done
-	chmod ugo+w     Img/exec_prefix/lib/Img/pkgIndex.tcl
-	mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl
-	chmod ugo+w     Img/exec_prefix/lib/Img/pkgIndex.tcl
-	for p in Img/exec_prefix/lib/*.sh ; do \
+	for p in $(INSTALL_ROOT)/$(prefix)/lib/*.sh ; do \
 		sed -e 's#$(libdir)/[^/ ]*\([/ ]\)#$(LIB_RUNTIME_DIR)\1#' \
 			$$p > $$p.1 && mv -f $$p.1 $$p ; \
 	done
